#pragma once
#include <iostream>
#include <unistd.h>
#include <functional>

using task_t = std::function<void()>;

void Download()
{
    std::cout << "我是一个下载任务..." << std::endl;
    sleep(3); // 假设处理任务比较耗时
}

class Task
{
public:
    Task() {}
    ~Task() {}
    void Execute()
    {
        _ret = _x + _y;
    }
    int X()
    {
        return _x;
    }
    int Y()
    {
        return _y;
    }
    int Ret()
    {
        return _ret;
    }

private:
    int _x;
    int _y;
    int _ret;
};